HAL FLASH macros migration ¶
This section provides information about the HAL FLASH macros migration.
Note
In HAL1, the FLASH driver manages Flash memory operations.
In HAL2, depending on the device family, memory operations are managed either by the FLASH driver or by the NVM driver.
In this migration guide, when a macro exists in both HAL2 FLASH and HAL2 NVM, the migration is illustrated using the HAL2 FLASH name. The same naming rule applies to HAL2 NVM.
Example: in HAL1,
__HAL_FLASH_DISABLE_ITmacro becomes:LL_FLASH_DisableITin HAL2 FLASH driver.LL_NVM_DisableITin HAL2 NVM driver.
For NVM-based families, the NVM driver provides programming services similar to those of FLASH with minor differences:
There is no erase step for NVM memories.
Erase-by-address, page erase, bank erase, and FLASH mass erase remain FLASH-specific.
For NVM-based families, the only erase service that may be exposed is OBK erase, when that feature exists.
HAL_FLASH_CALC_BOOT_BASE_ADR macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_CALC_BOOT_BASE_ADR
|
/* HAL2 provides granular option byte getters: */
HAL_FLASH_ITF_OB_GetBoot0(instance) /* for BOOT0 source state */
HAL_FLASH_ITF_OB_GetBoot1(instance) /* for BOOT1 source state */
|
Related concepts: Fully rework HAL Flash driver APIs., Merge HAL extension files with common ones and remove the EX prefix from APIs., Removal of underscore prefixes for macros, Removal of hardware-related macros in HAL2, Unitary configuration APIs
__HAL_FLASH_CLEAR_FLAG macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_CLEAR_FLAG
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_CLEAR_FLAG_BANK1 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_CLEAR_FLAG_BANK1
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_CLEAR_FLAG_BANK2 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_CLEAR_FLAG_BANK2
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_CLEAR_FLAG_NS macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_CLEAR_FLAG_NS
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_DISABLE_IT macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_DISABLE_IT
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_DISABLE_IT_BANK1 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_DISABLE_IT_BANK1
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_DISABLE_IT_BANK2 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_DISABLE_IT_BANK2
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_DISABLE_IT_NS macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_DISABLE_IT_NS
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_ENABLE_IT macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_ENABLE_IT
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_ENABLE_IT_BANK1 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_ENABLE_IT_BANK1
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_ENABLE_IT_BANK2 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_ENABLE_IT_BANK2
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_ENABLE_IT_NS macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_ENABLE_IT_NS
|
Moved to LL:
|
Related concepts: Revised and optimized HAL error management, Fully rework HAL Flash driver APIs.
__HAL_FLASH_GET_FLAG macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_FLAG
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_GET_FLAG_BANK1 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_FLAG_BANK1
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Fully rework HAL Flash driver APIs., Revised and optimized HAL error management
__HAL_FLASH_GET_FLAG_BANK2 macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_FLAG_BANK2
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_GET_FLAG_NS macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_FLAG_NS
|
Moved to LL:
|
Related concepts: Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_GET_LATENCY macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_LATENCY
|
/* HAL2 replacement: direct getter function */
hal_flash_itf_latency_t HAL_FLASH_ITF_GetLatency(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Merge HAL extension files with common ones and remove the EX prefix from APIs., Revised and optimized HAL error management
__HAL_FLASH_GET_PROGRAM_DELAY macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_GET_PROGRAM_DELAY
|
/* HAL2 replacement: direct getter + enum values */
hal_flash_itf_program_delay_t HAL_FLASH_ITF_GetProgrammingDelay(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management
__HAL_FLASH_INSTRUCTION_CACHE_DISABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_DisableIcache(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_EnableIcache(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_INSTRUCTION_CACHE_RESET macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_INSTRUCTION_CACHE_RESET
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_ResetIcache(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_POWER_DOWN_DISABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_POWER_DOWN_DISABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_DisablePWRDownSleepMode(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management
__HAL_FLASH_POWER_DOWN_ENABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_POWER_DOWN_ENABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_EnablePWRDownSleepMode(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management
__HAL_FLASH_PREFETCH_BUFFER_DISABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_DisablePrefetch(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_PREFETCH_BUFFER_ENABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_PREFETCH_BUFFER_ENABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_EnablePrefetch(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_SET_LATENCY macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_SET_LATENCY
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_SetLatency(hal_flash_t instance, hal_flash_itf_latency_t latency);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_SET_PROGRAM_DELAY macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_SET_PROGRAM_DELAY
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_SetProgrammingDelay(hal_flash_t instance, hal_flash_itf_program_delay_t prog_delay);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management, Merge HAL extension files with common ones and remove the EX prefix from APIs.
__HAL_FLASH_SLEEP_POWERDOWN_DISABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_SLEEP_POWERDOWN_DISABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_DisablePWRDownSleepMode(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management
__HAL_FLASH_SLEEP_POWERDOWN_ENABLE macro ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_FLASH_SLEEP_POWERDOWN_ENABLE
|
/* HAL2 replacement: explicit function call */
HAL_FLASH_ITF_EnablePWRDownSleepMode(hal_flash_t instance);
|
Related concepts: Fully rework HAL Flash driver APIs., Revised and optimized HAL error management